<template>
    <view class="popup" @click.self="close">
        <view class="popup-con">
			<view class="popup-con-title">
				<text class="left">Email</text>
				<text class="right" @click.stop="close">Done</text>
			</view>
			
			<view class="popup-con-box">
				<view class="sub">Your email address</view>
				<view class="text">{{dataVal}}</view>
				<view class="btn" @click.stop="done">Change my email</view>
			</view>
            
        </view>
    </view>
</template>
<script>
export default{
	props:{
		dataVal:{
			type:String,
			default:""
		}
	},
    methods:{
        done(){
			this.$emit("done")
            this.close()
        },
		close(){
			this.$emit("close")
		}
    }
}
</script>

<style  scoped lang="scss">
	.popup{
		z-index: 999;
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		display: flex;
		align-items: flex-end;
		justify-content: center;
		background: rgba(20,20,22,0.3);
		&-con{
			width: 100%;
			border-radius: 20rpx 20rpx 0 0;
			background-color: #fff;
			box-shadow: 0px 4px 40px 0px rgba(0,0,0,0.25);
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			&-title{
				width: 100%;
				display: flex;
				justify-content:center;
				align-items: center;
				font-size: 24rpx;
				color: #1D1E25;
				line-height: 36rpx;
				padding: 20rpx 0;
				border-bottom: 1px solid #E6E9ED;
				.left{
					flex: 1;
					text-align: right;
					font-size: 32rpx;
					line-height: 48rpx;
					justify-self: center;
				}
				.right{
					flex: 1;
					text-align: right;
					padding-right: 40rpx;
				}
			}
			&-box{
				width: 100%;
				padding: 50rpx 32rpx 40rpx 32rpx;
				text-align: center;
				.sub{
					font-weight: bold;
					font-size: 40rpx;
					line-height: 48rpx;
				}
				.text{
					margin-top: 29rpx;
					margin-bottom: 88rpx;
					font-weight: 500;
					font-size: 40rpx;
					color: #121212;
					line-height: 48rpx;
				}
				.btn{
					width: 100%;
					padding: 20rpx 0;
					text-align: center;
					background: #1A7B99;
					border-radius: 8rpx;
					font-weight: bold;
					font-size: 32rpx;
					color: #FFFFFF;
					line-height: 40rpx;
				}
			}
		}
	}
</style>
